#include "MainWindow.h"
#include "ui_MainWindow.h"
#include<qbitmap.h>
#include<qdebug.h>

//初始化键盘
MainWindow::MainWindow(QWidget *parent)
    : QMainWindow(parent)
    , ui(new Ui::MainWindow)
{
    ui->setupUi(this);//把ui文件中的全设好了
    //显示屏幕
    scr = new Screen(this,this);
    scr->show();
    drumset=1;//默认鼓组1

    for(int i=0;i<48;i++)
    {
        isActive[i]=0;
    }
    //窗口样式
    this->setWindowFlags(Qt::FramelessWindowHint);
    this->setFixedSize(1500,900);

    //圆角窗口
    QBitmap bmp(this->size());
    bmp.fill();
    QPainter p(&bmp);
    p.setPen(Qt::NoPen);
    p.setBrush(Qt::black);
    p.drawRoundedRect(bmp.rect(),15,15);
    setMask(bmp);
}

MainWindow::~MainWindow()
{
    delete ui;
}

void MainWindow::on_pushButton_2_clicked()
{
    this->close();
}

